<?php
/**
 * This file contains the class AlertsIntroView which provides
 * all of the text requirements for the alerts intro page
 *
 * @copyright  2009 A Memory Tree
 * @license    A Memory Tree License
 */
/**
 * This class provides the text for AlertsIntro
 *
 * @copyright  2009 A Memory Tree
 * @license    A Memory Tree License
 */
class AlertsIntroView
{
    /**
      * The html class that provides helpers to display the text
     *
     * @var Html
     */
    private $_html;
    /**
     * Builds the list of text messages
     * 
     * @return void
     * @param Html &$html
     */
    function __construct(&$html)
    {
        $this->_html = $html;
    }
    /**
     * The contents for the page
     *
     * @return string
     * @param string $intro
     */
    function content($intro)
    {
        return <<< EOT
$intro
    <form id="register" method="post" action="/registerEmail.php">
        <h2>Register your Email Address</h2>
        <p>
            <label for="email"><em>*</em> Email:</label>
            <input type="text" id="email" name="email" size="30" />
        </p>
        <p>
            <label for="emailConfirm"><em>*</em> Confirm email:</label>
            <input type="text" id="emailConfirm" name="emailConfirm" size="30" />
        </p>
        <p>
            <input type="submit" name="register" value="Register email address" class="button" />
        </p>
    </form>
    <p>View <a href="/alertsExample.php">example alerts</a></p>

EOT;
    }
    /**
     * Render the page
     *
     * @return string
     * @param string $content
     */
    function render($content)
    {
        return <<< EOT
<div id="centerbar">
$content
<script type="text/javascript" src="/js/alertsIntro.js"> </script>
</div>

EOT;
    }
}
?>